home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SGI Freeware 2002 November
/
SGI Freeware 2002 November - Disc 1.iso
/
dist
/
fw_gd.idb
/
usr
/
freeware
/
src
/
gd
/
patches.z
/
patches
Wrap
Text File
|
2002-04-08
|
11KB
|
307 lines
--- ./Makefile Thu Feb 22 09:03:43 2001
+++ ../gd-1.8.4/./Makefile Wed Apr 3 08:46:12 2002
@@ -1,9 +1,28 @@
#Depending on your system, you will need to modify this makefile.
+##sgi Comments added by the SGI freeware team start with
+##sgi "##sgi". This Makefile is based upon GNU make v. 3.79.1.
+
#If you do not have gcc, change the setting for COMPILER, but you must
#use an ANSI standard C compiler (NOT the old SunOS 4.1.3 cc
#compiler; get gcc if you are still using it).
-COMPILER=gcc
+#
+##sgi $(CC) is overwritten by the SGI freeware build process, so
+##sgi the setting for COMPILER is ignored; it is equivalent to
+##sgi the following, for a given choice of ABIISA below (uncomment one).
+##sgi
+##sgi n.b.: You will need to run "make clean" between builds with
+##sgi different ABIs. Failure to do so will result in
+##sgi errors complaining about incompatible objects.
+##sgi
+##sgi default case, library in /usr/freeware/lib32
+ABI=n32
+##sgi old 32-bit ABI, MIPS II instruction set, library in /usr/freeware/lib
+##sgi ABI=o32
+##sgi 64-bit library, library in /usr/freeware/lib64
+##sgi ABI=n64
+ABIISA=$(subst o,-mips2 -,$(subst 3 -3,3 -n3,$(subst n,-mips3 -, $(ABI))))
+COMPILER=/usr/bin/cc $(ABIISA)
#If the ar command fails on your system, consult the ar manpage
#for your system.
@@ -10,20 +29,19 @@
AR=ar
#If you don't have FreeType, libjpeg and/or Xpm installed, including the
-#header files, uncomment this (default). You really must install
-#libpng and zlib to get anywhere if you wish to create PNG images.
-CFLAGS=-O -DHAVE_LIBPNG -DHAVE_LIBJPEG
-
+#header files, uncomment this (default).
+#CFLAGS=-O
#If you do have FreeType, libjpeg and/or Xpm fully installed, uncomment a
#variation of this and comment out the line above. See also LIBS below.
-#CFLAGS=-O -DHAVE_LIBXPM -DHAVE_LIBPNG -DHAVE_LIBJPEG \
-# -DHAVE_LIBFREETYPE -DHAVE_LIBTTF
+#CFLAGS=-O -DHAVE_XPM -DHAVE_JPEG -DHAVE_LIBTTF
+##sgi
+##sgi CFLAGS is overwritten by the SGI freeware build process, but
+##sgi the equivalent information would be
+##WLIST=1009,1014,1048,1107,1110,1116,1164,1185,1188,1204,1230,1233
+##CFLAGS=-O3 -OPT:Olimit=0:space=ON -woff $(WLIST) -Wl,-woff,85,-woff,84\
+## -DHAVE_XPM -DHAVE_JPEG -DHAVE_LIBTTF -DBSD_SIGNALS
-#To use the old FreeType 1.x library, add this additional #define
-#to the line above
-#-DHAVE_LIBTTF
-
-#If you don't have FreeType Xpm fully installed, uncomment this
+#If you don't have FreeType and/or Xpm fully installed, uncomment this
#(default).
#PLEASE NOTE: YOU MAY HAVE TO JUGGLE THE ORDER OF THE LIBRARIES.
@@ -30,22 +48,43 @@
#Some systems are very picky about link order. They don't all agree
#on the right order, either.
-LIBS=-lgd -lpng -lz -lm
+#LIBS=-lm -lgd -lpng -lz
#If you do have FreeType, JPEG and/or Xpm fully installed, uncomment a
#variation of this and comment out the line above. Note that
#Xpm requires X11. See also CFLAGS above.
-#LIBS=-lgd -lpng -lz -ljpeg -lfreetype -lm -lttf
-
-#Note: for Freetype 1.x, use DHAVE_LIBTTF and -lttf instead.
+#PLEASE NOTE: YOU MAY HAVE TO JUGGLE THE ORDER OF THE LIBRARIES.
+#Some systems are very picky about link order. They don't all agree
+#on the right order, either.
-#Typical install locations for freetype, zlib, xpm, libjpeg and libpng header
-#files. If yours are somewhere else, change this. -I. is important to
-#ensure that the version of gd you are installing is used, and not an
-#older release in your directory tree somewhere.
+#LIBS=-lm -lgd -lpng -lz -ljpeg -lttf -lXpm -lX11
-INCLUDEDIRS=-I. -I/usr/include/freetype2 -I/usr/include/X11 -I/usr/X11R6/include/X11 -I/usr/local/include
+##sgi LIBS is overwritten by the SGI freeware build process, but
+##sgi the equivalent information would be
+LIBS=-lgd -lttf -lpng -lz -ljpeg -lXpm -lX11 -lm
+
+##sgi SHRLIBS is used to make the shared library (.so). It
+##sgi uses delayed loads for the Xpm functionality, since many
+##sgi uses of gd are for the PNG and JPEG functionality only.
+SHRLIBS=$(subst -lgd ,,$(patsubst -lX%,-delay_load -lX%,$(LIBS)))
+
+##sgi MAINLIB is used to determine whether or not the shared
+##sgi object library is made. It is overridden in the SGI
+##sgi freeware build procedure. Set it to libgd.so.1.1 if you
+##sgi wish to make the shared library.
+MAINLIB=libgd.a
+
+#Typical install locations for freetype, zlib, xpm, libjpeg and libpng header files.
+#If yours are somewhere else, change this.
+#-I. is important to ensure that the version of gd you are installing
+#is used, and not an older release in your directory tree somewhere.
+#INCLUDEDIRS=-I. -I/usr/local/include -I/usr/include/X11 -I/usr/X11R6/include/X11
+
+##sgi INCLUDEDIRS is overwritten by the SGI freeware build process, but
+##sgi the equivalent information (see the man page for cc regarding
+##sgi directory search order) would be:
+INCLUDEDIRS=-I/usr/freeware/include -I/usr/include/X11
#Typical install locations for freetype, zlib, xpm and libpng libraries.
#If yours are somewhere else, other than a standard location
@@ -53,18 +92,25 @@
#-L. as this allows the gd library itself to be found.
#Put -L. first so that old versions of the gd library elsewhere
#on your system can't cause conflicts while building a new one.
-#This line shouldn't hurt if you don't actually have some of the
-#optional libraries and directories.
-LIBDIRS=-L. -L/usr/local/lib -L/usr/lib/X11 -L/usr/X11R6/lib
-
+#LIBDIRS=-L. -L/usr/local/lib -L/usr/lib/X11 -L/usr/X11R6/lib
+##sgi
+##sgi LIBDIRS is overwritten by the SGI freeware build process, but
+##sgi the equivalent information would be:
+ABIDIR=$(subst o32,lib,$(subst n,lib,$(ABI)))
+LIBDIRS=-L/usr/freeware/$(ABIDIR)
+
+##sgi
+##sgi The following three "INSTALL" locations aren't actually
+##sgi used by the SGI freeware build procedure, but the equivalent
+##sgi values would be
#Location where libgd.a should be installed by "make install".
-INSTALL_LIB=/usr/local/lib
+INSTALL_LIB=/usr/freeware/$(ABIDIR)
#Location where .h files should be installed by "make install".
-INSTALL_INCLUDE=/usr/local/include
+INSTALL_INCLUDE=/usr/freeware/include
#Location where useful non-test programs should be installed by "make install".
-INSTALL_BIN=/usr/local/bin
+INSTALL_BIN=/usr/freeware/bin
#
#
@@ -71,7 +117,13 @@
# Changes should not be required below here.
#
#
+##sgi
+##sgi Some changes are required, because we want to build
+##sgi shared libraries for the freeware distribution (one
+##sgi for this is to use them for *other* freeware!).
+##sgi Also, no "ranlib" is required under IRIX.
+RANLIB=:
VERSION=1.8.4
CC=$(COMPILER) $(INCLUDEDIRS)
@@ -82,7 +134,7 @@
BIN_PROGRAMS=pngtogd pngtogd2 gdtopng gd2topng gd2copypal gdparttopng webpng
TEST_PROGRAMS=gdtest gddemo gd2time gdtestft gdtestttf
-all: libgd.a $(PROGRAMS)
+all: $(MAINLIB) $(PROGRAMS)
install: libgd.a $(BIN_PROGRAMS)
sh ./install-item 644 libgd.a $(INSTALL_LIB)/libgd.a
@@ -134,9 +186,9 @@
$(CC) gd2time.o -o gd2time $(LIBDIRS) $(LIBS)
gdtestft: gdtestft.o libgd.a
- $(CC) --verbose gdtestft.o -o gdtestft $(LIBDIRS) $(LIBS)
+ $(CC) gdtestft.o -o gdtestft $(LIBDIRS) $(LIBS)
gdtestttf: gdtestttf.o libgd.a
- $(CC) --verbose gdtestttf.o -o gdtestttf $(LIBDIRS) $(LIBS)
+ $(CC) gdtestttf.o -o gdtestttf $(LIBDIRS) $(LIBS)
libgd.a: gd.o gd_gd.o gd_gd2.o gd_io.o gd_io_dp.o gd_io_file.o gd_ss.o \
gd_io_ss.o gd_png.o gd_jpeg.o gdxpm.o gdfontt.o gdfonts.o gdfontmb.o gdfontl.o \
@@ -149,8 +201,15 @@
gdfontt.o gdfonts.o gdfontmb.o gdfontl.o gdfontg.o \
gdtables.o gdft.o gdttf.o gdcache.o gdkanji.o wbmp.o \
gd_wbmp.o gdhelpers.o
- -ranlib libgd.a
+ -$(RANLIB) libgd.a
+
+libgd.so.1.1: libgd.a
+ $(CC) -elf -shared -no_unresolved -rdata_shared -soname libgd.so \
+ -set_version sgi1.1 -o libgd.so.1.1 -all $< \
+ $(SHRLIBS)
+ ln -s libgd.so.1.1 libgd.so
clean:
- rm -f *.o *.a ${PROGRAMS} test/gdtest.jpg test/gdtest.wbmp
+ rm -f *.o libgd.a libgd.so.1.1 libgd.so ${PROGRAMS} \
+ test/gdtest.jpg test/gdtest.wbmp
--- ./gd_jpeg.c Tue Feb 13 12:05:32 2001
+++ ../gd-1.8.4/./gd_jpeg.c Wed Apr 3 08:46:12 2002
@@ -439,7 +439,7 @@
gdIOCtx *infile; /* source stream */
unsigned char * buffer; /* start of buffer */
- safeboolean start_of_file; /* have we gotten any data yet? */
+ safeboolean start_of_file; /* have we gotten any data yet? */
} my_source_mgr;
typedef my_source_mgr * my_src_ptr;
@@ -496,31 +496,31 @@
* Data beyond this point must be rescanned after resumption, so move it to
* the front of the buffer rather than discarding it.
*/
-
-#define END_JPEG_SEQUENCE "\r\n[*]--:END JPEG:--[*]\r\n"
+#define END_JPEG_SEQUENCE "\r\n[*]--:END JPEG:--[*]\r\n"
+
safeboolean
fill_input_buffer (j_decompress_ptr cinfo)
{
my_src_ptr src = (my_src_ptr) cinfo->src;
- size_t nbytes = 0;
+ size_t nbytes = 0;
/* size_t got; */
/* char *s; */
- memset(src->buffer, 0, INPUT_BUF_SIZE);
- while (nbytes < INPUT_BUF_SIZE) {
- int got = gdGetBuf(src->buffer + nbytes,
+ memset(src->buffer, 0, INPUT_BUF_SIZE);
+ while (nbytes < INPUT_BUF_SIZE) {
+ int got = gdGetBuf(src->buffer + nbytes,
INPUT_BUF_SIZE - nbytes,
- src->infile);
- if ((got == EOF) || (got == 0)) {
- /* EOF or error. If we got any data, don't worry about it.
- If we didn't, then this is unexpected. */
- if (!nbytes) {
- nbytes = -1;
- }
- break;
- }
- nbytes += got;
- }
+ src->infile);
+ if ((got == EOF) || (got == 0)) {
+ /* EOF or error. If we got any data, don't worry about it.
+ If we didn't, then this is unexpected. */
+ if (!nbytes) {
+ nbytes = -1;
+ }
+ break;
+ }
+ nbytes += got;
+ }
if (nbytes <= 0) {
if (src->start_of_file) /* Treat empty input file as fatal error */
ERREXIT(cinfo, JERR_INPUT_EMPTY);
@@ -593,10 +593,10 @@
void
term_source (j_decompress_ptr cinfo)
-{
+{
#if 0
/* never used */
- my_src_ptr src = (my_src_ptr) cinfo->src;
+ my_src_ptr src = (my_src_ptr) cinfo->src;
#endif
}
@@ -627,7 +627,7 @@
src = (my_src_ptr) cinfo->src;
src->buffer = (unsigned char *)
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT,
- INPUT_BUF_SIZE * sizeof(unsigned char));
+ INPUT_BUF_SIZE * sizeof(unsigned char));
}
src = (my_src_ptr) cinfo->src;
--- ./gdtestft.c Tue Feb 6 11:44:02 2001
+++ ../gd-1.8.4/./gdtestft.c Wed Apr 3 08:46:12 2002
@@ -51,7 +51,7 @@
char *f = "/usr/openwin/lib/locale/ja/X11/fonts/TT/HG-MinchoL.ttf"; /* UNICODE */
/* char *f = "/usr/local/lib/fonts/truetype/DynaFont/dfpop1.ttf"; */ /* SJIS */
#else
- char *f = "times"; /* TrueType font */
+ char *f = "/usr/tmp/times.ttf"; /* TrueType font */
#endif
/* obtain brect so that we can size the image */
--- ./gdtestttf.c Tue Feb 6 11:44:02 2001
+++ ../gd-1.8.4/./gdtestttf.c Wed Apr 3 08:46:12 2002
@@ -44,7 +44,7 @@
char *f = "/usr/openwin/lib/locale/ja/X11/fonts/TT/HG-MinchoL.ttf"; /* UNICODE */
/* char *f = "/usr/local/lib/fonts/truetype/DynaFont/dfpop1.ttf"; */ /* SJIS */
#else
- char *f = "/usr/local/lib/fonts/truetype/misc/times.ttf"; /* TrueType font */
+ char *f = "/usr/tmp/times.ttf"; /* TrueType font */
#endif
fprintf(stderr, "HEY! THIS IS FOR THE FREETYPE 1.x LIBRARY.\n\n");